<?php require 'common/header.php';?>
<?php require 'common/left.php';?>
<link type="text/css" rel="stylesheet" href="/assets/css/editor.css" />
<script type="text/javascript" src="/assets/js/editor.js"></script>
<div id="main-content">
  <h2>欢迎您 <?php echo $_COOKIE['adminname'];?></h2>
  <p id="page-intro">文章管理</p>
  <div class="clear"></div>
  <div class="content-box">
    <div class="content-box-header">
      <h3>文章管理</h3>
      <ul class="content-box-tabs">
      	 <li><a href="<?php echo Qtpl::createUrl('article', 'index','','admin');?>">文章列表</a></li>
         <li><a href="<?php echo Qtpl::createUrl('article', 'show','','admin');?>" class="default-tab">添加文章</a></li>
	  </ul>
      <div class="clear"></div>
    </div>
    <div class="content-box-content">
        <div class="tab-content default-tab" id="tab1">
          <div class="form">
              <form action="<?php echo Qtpl::createUrl('article', 'show','','admin');?>" method="post" id="js-form">
                	<fieldset class="clearfix">
                      <input type="hidden" name="token" value="<?php echo $_tpl['token'];?>" />
                      <input type="hidden" name="aid" value="<?php echo $_tpl['article']['aid'];?>" />
                        <p><label><font class="red"> * </font>文章标题：</label>
                        <span><input type="text" value="<?php echo $_tpl['article']['title'];?>" class="text-input small-input" name="title" /></span>
                        </p>
                        <p><label>文章出处：</label>
                        <span><input type="text" value="<?php echo $_tpl['article']['from'] ? $_tpl['article']['from'] : "本站";?>" class="text-input small-input" name="from" /></span>
                        </p>
                        <p><label>浏览数：</label>
                        <span><input type="text" value="<?php echo (int)$_tpl['article']['views'];?>" class="text-input small-input" name="views" /></span>
                        </p>
                        <p><label><font class="red"> * </font>文章详情：</label>
                        <span>
                        <div class="editor">
            				<div id="editor_tools" class="tools">initializing...</div>
            				<textarea id="editor_content" name="content"><?php echo $_tpl['article']['content'];?></textarea>
          				</div>
          					<script language="javascript">
								Editor("editor_content","editor_tools",["B","I","U","img","video","link","code"],200);
							</script>
						</span>
                        </p>
                  <dt>
                    <input type="submit" name="" id="button" class="button" value="<?php echo $_tpl['hname'];?>" />
                  </dt>
                </fieldset>
              </form>
            </div>
        </div>
      </div>
  </div>
<?php require 'common/footer.php';?>